package com.yc.mvplib.Retrofit.net.entity;

import com.google.gson.annotations.SerializedName;
import com.yc.mvplib.Retrofit.HttpConfig;



/**
 * Created by lenovo on 2017/12/4.
 */

public class BaseEntity <T>{
    @SerializedName("code")
    private int code;
    @SerializedName("msg")
    private String msg;
    @SerializedName("data")
    private T data;

    public boolean isSuccess() {
        return code == HttpConfig.DEFAULT_HTTP_SUCCESSCODE;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public T getData() {
        return data;
    }
}
